<template>
    <div class="container">
        <div class="sk" :style="{background: getColor}">

        </div>
        <slot></slot>
    </div>
</template>

<script>
    export default {
        name: "jq.vue",
        computed: {
            getColor: function () {
                let colorArray = ['#CA4040', '#FF8604', '#0078D7'];
                return colorArray[Math.floor(Math.random() * colorArray.length)]
            }
        },
    }
</script>

<style scoped>
    .container{
        width: 100%;
        height: 400px;
        position: relative;
        margin-top: 30px;
        overflow: hidden;
        padding-right: 0;
    }
    .sk {
        width: 400px;
        height: 400px;
        position: absolute;
        left:0;
        top:0;
    }
</style>